import {getRequest, postRequest} from '@/lib/request';

export const payApi = {
    payCarry: (param) => {
        return postRequest('/order/create/carry', param)
    },
    pay: (param) => {
        return postRequest('/order/pay', param)
    },
    getCharge: () => {
        return getRequest('/recharge')
    },
    orderTopic:(param)=>{
        return postRequest('/question-category-order/create',param)
    },
    payTopic:(param)=>{
        return postRequest('/question-category-order/pay',param)
    },
    //订单列表
    orderUserList: (param) => {
        return getRequest(`/question-category-order/user/list?page=${param.page}&status=${param.status}&keyword=${param.keyword}`)
    },
    //取消订单
    cancelOrder:(id)=>{
        return postRequest(`/question-category-order/${id}/cancel`)
    },
}